var menu;
var theTop = 30;
var tbl;
var menu_name ="";
var old = theTop;

function menuname(id_name)
{
  menu = new getObj(id_name);
  //movemenu();
}
function hide(menu_name)
{
 menu = new getObj(menu_name);
 menu.style.visibility = 'hidden';
}
function hide_line()
{
 //tbl = new getObj(t_name);
 if (tbl.style.display == 'none') {tbl.style.display = 'table-row';}
 else {tbl.style.display = 'none';} 
}
function show()
{
 menu.style.visibility = 'visible';
}
function movemenu()
{
        //menu = new getObj('menu');
	
	if (window.innerHeight)
	{
		  pos = window.pageYOffset
	}
	else if (document.documentElement && document.documentElement.scrollTop)
	{
		pos = document.documentElement.scrollTop
	}
	else if (document.body)
	{
		  pos = document.body.scrollTop
	}
	if (pos < theTop) pos = theTop;
	else pos += 20;
	if (pos == old)
	{
		menu.style.top = pos;
		show();
		return
	}
	old = pos;
	temp = setTimeout('movemenu()',50);
}

function writit(text,id)
{
	if (document.getElementById)
	{
		x = document.getElementById(id);
		x.innerHTML = '';
		x.innerHTML = text;
	}
	else if (document.all)
	{
		x = document.all[id];
		x.innerHTML = text;
	}
	else if (document.layers)
	{
		x = document.layers[id];
		text2 = '<P CLASS="testclass">' + text + '</P>';
		x.document.open();
		x.document.write(text2);
		x.document.close();
	}
}

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

var comp;

function showhide(val)
{
	comp.style.visibility = val;
}
